package com.lxmes.base.service.impl;

import java.util.List;
import com.lxmes.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lxmes.base.mapper.JcProjectMainMapper;
import com.lxmes.base.domain.JcProjectMain;
import com.lxmes.base.service.IJcProjectMainService;

/**
 * 项目管理Service业务层处理
 * 
 * @author 王超
 * @date 2022-08-27
 */
@Service
public class JcProjectMainServiceImpl implements IJcProjectMainService 
{
    @Autowired
    private JcProjectMainMapper jcProjectMainMapper;

    /**
     * 查询项目管理
     * 
     * @param id 项目管理主键
     * @return 项目管理
     */
    @Override
    public JcProjectMain selectJcProjectMainById(Long id)
    {
        return jcProjectMainMapper.selectJcProjectMainById(id);
    }

    /**
     * 查询项目管理列表
     * 
     * @param jcProjectMain 项目管理
     * @return 项目管理
     */
    @Override
    public List<JcProjectMain> selectJcProjectMainList(JcProjectMain jcProjectMain)
    {
        return jcProjectMainMapper.selectJcProjectMainList(jcProjectMain);
    }

    /**
     * 新增项目管理
     * 
     * @param jcProjectMain 项目管理
     * @return 结果
     */
    @Override
    public int insertJcProjectMain(JcProjectMain jcProjectMain)
    {
        jcProjectMain.setCreateTime(DateUtils.getNowDate());
        return jcProjectMainMapper.insertJcProjectMain(jcProjectMain);
    }

    /**
     * 修改项目管理
     * 
     * @param jcProjectMain 项目管理
     * @return 结果
     */
    @Override
    public int updateJcProjectMain(JcProjectMain jcProjectMain)
    {
        jcProjectMain.setUpdateTime(DateUtils.getNowDate());
        return jcProjectMainMapper.updateJcProjectMain(jcProjectMain);
    }

    /**
     * 批量删除项目管理
     * 
     * @param ids 需要删除的项目管理主键
     * @return 结果
     */
    @Override
    public int deleteJcProjectMainByIds(Long[] ids)
    {
        return jcProjectMainMapper.deleteJcProjectMainByIds(ids);
    }

    /**
     * 删除项目管理信息
     * 
     * @param id 项目管理主键
     * @return 结果
     */
    @Override
    public int deleteJcProjectMainById(Long id)
    {
        return jcProjectMainMapper.deleteJcProjectMainById(id);
    }
}
